<?php
/**
 * Description of Factory
 *
 * @author pahhan
 */
class Model_Parser_ParserFactory
{
    public function create($key)
    {
        switch ($key)
        {
            case 'ithappens_stories':
                return new Model_Parser_ItHappens_Parser();
            case 'bash_quotes':
                return new Model_Parser_BashQuotes_Parser();

            default:
                throw new Model_Parser_ParserException(sprintf('Undefined key "%s"', $key));
        }
    }
}

